package com.zhouyu.service;

import com.spring.*;

/**
 * @author xuxin
 * @create 2024-10-08 22:23
 */
@Component("userService")
public class UserServiceImpl implements BeanNameAware, InitializingBean, UserService {


    @AutoWired
    private OrderService orderService;

    private String beanName;

    private Integer age;

    @Override
    public void setBeanName(String name) {
        beanName = name;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("初始化");
    }

    public void test() {
        System.out.println(orderService);
        System.out.println(beanName);
        System.out.println(age);
    }

}
